'use strict';
let req_success=function(res){
    console.log(res);
    let p3=document.getElementById('p3')
    p3.innerText=JSON.stringify(res)
}

let req_fail=function(res){
    console.log(res);
}

let req=new XMLHttpRequest();

req.onreadystatechange=function(){
    if(req.readyState === 4){
        if(req.status === 200){
            let res=JSON.parse(req.response)
            req_success(res)
        }else{
            req_fail(req)
        }
    }
}


req.open('get',)

req.send()